home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / internet / uucoder / uucoder.txt < prev    next >
Encoding:
Text File  |  1995-06-15  |  6.0 KB  |  143 lines

  1. UUCODER.VBX
  2.  
  3. Please take a moment to read this document before using UUCODER.VBX. It explains the properties and events supported by this Control.
  4. Included in the UUCODER.EXE file is UUDEMO.MAK which demonstrates how to use UUCODER.VBX.
  5.  
  6. Overview.
  7. UU Coding is a common techniqus used on the internet to post binary files. The contents of a binary file are 'encoded' up into text characters that can be handled by all mail handlers. A UU Decoder is simply a program that takes the encoded data and recreates the original file. This control supports both UU and XX  Encoding\Decoding.
  8. This product is shareware. You can register in two ways.
  9.  
  10.  
  11. 1. GO SWREG on Compuserve.
  12. 2. Send 10$ + 2$ S&H to:
  13.  
  14.     Steve Bridges
  15.     76 Nash St 2nd Floor
  16.     New Haven CT 06511.
  17. Make checks payable to Steve Bridges.
  18.  
  19. Registered users receive the latest version plus the source code.
  20.  
  21. If you have any questions or problems you can contact me at:
  22.  
  23. 71507,1033@compuserve.com
  24. STEVEB3019@aol.com
  25.  
  26.     
  27.  
  28. Properties.
  29.     InFile.
  30.         Specifies the name of the file to process. For an encoding operation this is the             name of the file to be encoded. For a decoding operation this is the name of the
  31.         file containing the UU or XX coded data.
  32.  
  33.         Example.
  34.  
  35.         Form.Control.InFile = "C:\TEMP\INPUT.FIL"
  36.  
  37.     OutFile.
  38.         Specifies the name of the file that will hold the encoded data. This property is             only used for an encoding operation. If this property is left blank then the control             will default the output file name to the input file name with an extension of .UUE             or .XXE depending on the encoding method chosen. 
  39.  
  40.         Example.
  41.  
  42.         Form.Control.OutFIle = "C:\TEMP\INPUT.UUE"
  43.         
  44.         Form.Control.OutFile = "C:\TEMP\"      ' specify a directory only. The control
  45.                                  ' will default the file name and put the
  46.                                  ' encoded files here.            
  47.     Type.
  48.         Specifies the type of encoded file to create or decode.
  49.  
  50.               Values:
  51.             0    Use UU Encoding\Decoding
  52.             1    Use XX Encoding\Decoding
  53.             2    Auto Detect based on file contents.
  54.  
  55.         For encoding operations a type of 2 will default to creating a UU encoded file.             For decoding operations a type of two will analyze the input data and attempt to
  56.         determine the coding method.
  57.  
  58.         Example.
  59.         
  60.             Form.Control.Type = 1
  61.  
  62.     Open.     
  63.         This property is only relevant for decoding operation. If it is set to true then the             control will attempt to execute the application associated with the type of output             file created. (i.e NOTEPAD.EXE for .TXT files).
  64.         Note.
  65.         If the input data contained multiple output files then the associated application             will be invoked for each file created.
  66.  
  67.         Example.
  68.  
  69.             Form.Control.Open = true
  70.     Action.
  71.         Setting this property will cause the control to either encode or decode a file.
  72.  
  73.             Values.
  74.             0    Decode a file back into it's original
  75.             1    Encode a file
  76.  
  77.         Example.
  78.  
  79.             Form.Control.Action = 1
  80.  
  81.     LinesPerFile.
  82.         This property is used for encoding only. It determines the maximum lines of             encoded data to write to an output file.  The control will create multiple output            files each holding up to this propertys values lines of data. The default seting is             950. A setting of zero prevents the control from splitting the encoded file up into             smaller files.
  83.         The output files are sequentially numbered.
  84.  
  85.         Example.
  86.  
  87.             Form.Control.LinesPerFile = 10
  88.             Form.Control.InFile = "INFILE.DAT"
  89.             Form.Control.Action = 1
  90.  
  91.             Assuming that the data in the input file would cause three output files to                 be created then the output files would be named:
  92.                 
  93.                 INFIL1.UUE
  94.                 INFIL2.UUE
  95.                 INFIL3.UUE
  96.                     
  97.     Result.
  98.         Specifies the result of the encoding or decoding operation. This is a read only
  99.         property.
  100.  
  101.               Values
  102.             20000    - Invalid Action supplied
  103.             20001   - An error occurred opening an input or output file.
  104.             20002    - No valid encoded data was found during a decode action.
  105.             20003    - The operation completed normally.
  106.             20004    - The specified file was not found.
  107.             20005    - No input file was supplied. 
  108.      
  109. Events.
  110.     The control supports one event. This event is passed a message number and a string.         Some of the messages are informational and can be ignored, others require some         action. The messages are detailed below.
  111.  
  112.     sub ctlname_Message (MsgNum as integer, Msg as string)
  113.  
  114.     MsgNum        1  (OUTPUT_FILE)
  115.     Msg            File name of file being created from the encoded data. If the                     input file contains multiple encoded files then you will receive                     this message for each file decoded. This message is sent for
  116.                 each 'begin nnn filename.exe' that is encountered.
  117.                 This is an informational message.
  118.  
  119.     MsgNum        2 (GET_NEXTFILE)
  120.     Msg            Indicates that the next part of a multi file encoded file could not                    be found. For a multi part file the control builds the name of the                     next input file based on the name of the current input file being
  121.                 processed. It does this by assigning numbers to the end of the    
  122.                 input file name. i.e
  123.                 Control.Form.InFile = "UUFILE1.UUE". The next file that the                     control will attempt to use is:
  124.                 UUFILE2.UUE. If the control cannot find this file it trigger this                    message passing the name of the file it tried to open. Your code                    must supply the name of the next file to be used.
  125.  
  126.  
  127.     MsgNum        3 (WRITE_FILE)
  128.     Msg            specifies the next file name that will be used for a multiple                     output file encoding operation. Multiple output filenames are                    generated by adding a number to the end of the filename. E.g
  129.         
  130.                     Form.Control.InFile = "UUFILE.DAT"
  131.  
  132.                 If this encoded to three output files the control would default                     them to:
  133.  
  134.                 UUFIL1.UUE
  135.                 UUFIL2.UUE
  136.                 UUFIL3.UUE
  137.  
  138.                 You can use this event to modify the name that will be used. To                     do this simply change the Msg to the file name you wish to use.
  139.  
  140.     MsgNum        4 (DECODING_FILE)
  141.     Msg            Specifies the next file that the control will use in a multi file                     decoding operation. This is an informational message only. Any                    modifications to the message are ignored.
  142.  
  143.